The present disclosure relates to a sewing machine that is provided with a plurality of needle bars and to a non-transitory computer-readable medium.
A sewing machine that is provided with a plurality of needle bars is known. For each one of a plurality of partial patterns that make up an embroidery pattern, the multi-needle sewing machine acquires a number n, which is the number of stitches that are required in order to sew the partial pattern. The multi-needle sewing machine is configured to allocate a plurality of upper threads to the plurality of the needle bars, based on the acquired number n, such that the numbers of stitches that are allocated among the plurality of the needle bars are not distributed unevenly.